/**
 * 查找元素的父元素
 * @param el
 * @param predicate
 */
export function findElementParent(el: HTMLElement, predicate: (el: HTMLElement) => boolean) {
  let parent = el.parentElement;
  while (parent) {
    if (predicate(parent)) {
      return parent;
    }
    parent = parent.parentElement;
  }
}
